Using a slow serial console with sync_console on SMP leaves an
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 3 Dec 2005 09:44:01 +0000 (10:44 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 3 Dec 2005 09:44:01 +0000 (10:44 +0100)
unusable system: it gets into a flood of

Timer ISR/0: Time went backwards: delta=-3566279 cpu_delta=16433721
shadow=2019998373 off=420435384 processed=2444000000
cpu_processed=2424000000
 0: 2424000000
 1: 2444000000

messages which swamps the console and leaves things almost, but not
quite, completely hung.  It is a simple matter to ratelimit these
printks, which completely eliminates the problem.

linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c

index 915f7f033a669ca296df29b79f9eadd2ecf4b21f..88034beac3617b2b8f8b61390e4d9dd1035af0a4 100644 (file)
@@ -560,7 +560,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        }
        while (!time_values_up_to_date(cpu));
 
-       if (unlikely(delta < -1000000LL) || unlikely(delta_cpu < 0)) {
+       if ((unlikely(delta < -1000000LL) || unlikely(delta_cpu < 0))
+           && printk_ratelimit()) {
                printk("Timer ISR/%d: Time went backwards: "
                       "delta=%lld cpu_delta=%lld shadow=%lld "
                       "off=%lld processed=%lld cpu_processed=%lld\n",